#include <iostream>
#include <vector>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
using namespace std;

// 已知
int n, sum = 0, x, y;
// 未知

signed main()
{
    cin >> n;
    n = (n + 1) / 2; // 奇数位个数
    for (int i = 0; i < n; ++i)
    {
        cin >> x >> y; // x为奇数位，y为偶数位
        sum += x;
    }
    cout << sum << endl;
    return 0;
}